<template>
  <div>
      <h1>Home</h1>
      <button @click="handler">返回</button>
  </div>
</template>

<script setup>
import { useRouter } from "vue-router"


const router = useRouter()

const handler = e => { 
  sessionStorage.removeItem('user')
  router.replace('/')
}

</script>

<style lang="scss" scoped>

</style>